package com.inventive.jmscache.server;

import javax.swing.*;
import javax.transaction.xa.XAResource;
import java.util.List;
import java.util.Iterator;

/**
 * Created by IntelliJ IDEA.
 * User: glittle
 * Date: 13/06/11
 * Time: 1:52 PM
 */
public interface JmsCacheServer {

    void start();
    void stop();
    BackendQueue getQueue(String name);
    BackendTopic getTopic(String name);
    void startTransaction();
    void commitTransaction();
    void rollbackTransaction();
    List<JmsCacheMessage> getMessages(String queueName, String messageSelector);
    Iterator<JmsCacheMessage> getMessageIterator(String queueName, String messageSelector);
    XAResource getBackendXAResource();
    List<String> getSubscriptionsForTopic(String name);
    void addMessageIdToSubscription(String subscriptionId, String messageId);

}
